-- GENERATED SPELL FOR [Burning Blade Acolyte] --


function spell0_3380(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3380', 24000, 1)
end

function spell1_3380(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(689,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_3380', 5000, 1)
end

function spell2_3380(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3380', 17000, 1)
end

function Sorts_3380(pUnit, Event)
local choix_sorts_3380 = math.random(0, 2)
if choix_sorts_3380 == 0 then
pUnit:RegisterEvent('spell0_3380', 1, 1)
end
if choix_sorts_3380 == 1 then
pUnit:RegisterEvent('spell1_3380', 1, 1)
end
if choix_sorts_3380 == 2 then
pUnit:RegisterEvent('spell2_3380', 1, 1)
end
end

function mob3380_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3380', math.random(1500, 3000), 1)
end

function mob3380_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3380_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3380_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3380, 1, 'mob3380_Action')
RegisterUnitEvent(3380, 2, 'mob3380_Leave')
RegisterUnitEvent(3380, 3, 'mob3380_Kill')
RegisterUnitEvent(3380, 4, 'mob3380_Die')
